#include<bits/stdc++.h>
#define LL long long
#define SZ(x) ((LL)(x.size()))
#define all(x) (x).begin(),(x).end()
using namespace std;
inline LL read(){
  LL q=0,w=1;char ch=getchar();
  while(ch>'9' || ch<'0'){if(ch=='-')w=-1;ch=getchar();}
  while(ch>='0'&&ch<='9'){q=q*10+(ch-'0');ch=getchar();}
  return q*w;
}
void write(LL x){
  if(x<0){putchar('-');x=(-x);}
  if(x>9)write(x/10);
  putchar('0'+x%10);
}
inline void writeln(LL x){write(x);puts("");}
inline void writecs(LL x){write(x);putchar(' ');}

template<LL N,LL M>struct mcmf{
  struct Edge{LL to,nxt,w,c;}e[M<<1];LL head[N],cur[N],tot=1;
  inline void __add_e(LL u,LL v,LL w,LL c){e[++tot].to=v;e[tot].nxt=head[u];e[tot].w=w;e[tot].c=c;head[u]=tot;return ;}
  inline void add_e(LL u,LL v,LL w,LL c){
    //    cout<<"> u = "<<u<<" v = "<<v<<" w = "<<w<<" c = "<<c<<endl;
    __add_e(u,v,w,c);__add_e(v,u,0,-c);}
  LL n,s,t,dis[N],pr[N],id[N];bool vis[N];
  inline bool spfa(){
    for(LL x=1;x<=n;x++){cur[x]=head[x];dis[x]=(LL)(1e18);vis[x]=0;}
    dis[s]=0;queue<LL>q;q.push(s);vis[s]=1;
    while(!q.empty()){
      LL x=q.front();q.pop();vis[x]=0;
      for(LL i=head[x];i;i=e[i].nxt){
	LL y=e[i].to,w=e[i].w,c=e[i].c;
	if(dis[y]>dis[x]+c&&w){
	  dis[y]=dis[x]+c;pr[y]=x;id[y]=i;
	  if(!vis[y]){q.push(y);vis[y]=1;}
	}
      }
    }
    return (dis[t]!=(LL)(1e18));
  }
  inline LL doit(){
    assert(spfa());LL x=t;
    while(x!=s){
      //      cout<<" -> x = "<<x<<" pr[x] = "<<pr[x]<<endl;
      LL i=id[x];e[i].w--;e[i^1].w++;x=pr[x];
    }
    //    cout<<endl;
    return dis[t];
  }
};

inline void dmin(LL &x,LL y){if(x>y)x=y;return ;}
inline void dmax(LL &x,LL y){if(x<y)x=y;return ;}

struct pt{LL x,y;};
inline pt operator+(pt x,pt y){return (pt){x.x+y.x,x.y+y.y};}
inline pt operator-(pt x,pt y){return (pt){x.x-y.x,x.y-y.y};}
struct VC{
  vector<pt>vc;
  inline void push_back(pt x){
    while(SZ(vc)>=2){
      pt A=(x-vc.back()),B=(vc.back()-vc[SZ(vc)-2]);
      if(((__int128)B.y*A.x)<((__int128)A.y*B.x))break;
      vc.pop_back();
    }
    vc.push_back(x);return ;
  }
  inline LL qry(LL c){
    assert(SZ(vc)>0);
    auto calc=[&](LL mid){return (LL)vc[mid].y+(LL)vc[mid].x*c;};
    LL l=1,r=SZ(vc)-1,pos=0;
    while(l<=r){
      LL mid=(l+r)>>1;
      if(calc(mid-1)>calc(mid)){l=mid+1;pos=mid;}
      else {r=mid-1;}
    }
    return calc(pos);
  }
};

const LL N = 300+95 , inf = (LL)(1e14) ;
LL n,m,Q;mcmf<(N<<1),((N*N)<<1)>T;LL s,t,in[N],out[N],tot;LL coef[N];VC H;
int main(){
  freopen("journey.in","r",stdin);
  freopen("journey.out","w",stdout);
  n=read();m=read();Q=read();
  
  s=++tot;t=++tot;for(LL i=1;i<=n;i++){in[i]=++tot;out[i]=++tot;}
  T.n=tot;T.s=s;T.t=t;
  
  for(LL i=1;i<=m;i++){
    LL u=read(),v=read(),w=read();
    T.add_e(in[u],out[v],inf,w);
  }
  for(LL i=1;i<=n;i++){T.add_e(s,in[i],1,0);T.add_e(out[i],t,1,0);T.add_e(out[i],in[i],inf,0);}
  for(LL i=1;i<=n;i++)T.add_e(in[i],t,inf,inf);

  //  for(LL i=1;i<=n;i++)cout<<"  i = "<<i<<" in[i] = "<<in[i]<<" out[i] = "<<out[i]<<endl;
  for(LL t=1;t<=n;t++){LL d=T.doit();coef[t]=coef[t-1]+d;}
  
  //  cout<<" coef : "<<endl;for(LL t=0;t<=n;t++)cout<<" t = "<<t<<" coef[t] = "<<coef[t]<<endl;cout<<endl;

  vector<pt>vc;
  for(LL t=n;t>=0;t--)vc.push_back((pt){(n-t),coef[t]});
  for(LL t=0;t<SZ(vc);t++)H.push_back(vc[t]);
  
  while(Q--){
    LL c=read();
    writeln(H.qry(c));
  }
  return 0;
}
